<html>

<body>
<?php
	require "config.php";
	$id = $_GET['id'];
	$name = $_GET['name'];
	$con = mysql_connect("localhost",$db_user ,$db_pass);
	// if an error was encountered, the script exits with an error message
	if (!$con){
		die('Could not connect: ' . mysql_error());
    }
	mysql_select_db($db_name, $con);
	$sql_edit = "Update student set Name ='$name' where ID = '$id' ;" ;
	$result = mysql_query($sql_edit);
	mysql_close($con);
?>
<h1>Student successfully updated</h1>
</body>
<br />
<a href="student.php">Home</a>
<a href="viewstudents.php">View Students</a>
</html>
